﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BehaviorSystem
{

    /// <summary>
    /// 行为节点基类
    /// </summary>
    public class ActionNode : BehaviourNode
    {
        public ActionNode(IBehaviorAgent agent) : base(agent)
        {
            CurState = BTNodeState.Running;
        }

        public override BTNodeState ExcuteNode()
        {
            OnExcuted();
            return HandleAction();
        }

        public virtual BTNodeState HandleAction()
        {
            return BTNodeState.Success;
        }

    }
}